// module.exports = {
//     entry: {
//         'index/index': './src/pages/index/index.js'
//     },
//     output: {
//         filename: 'build/pages/[name].bundle.js'
//     }
// };
//开始 webpack --watch
//webpack-dev-server --progress --colors
var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');

module.exports = {
 //插件项
 plugins: [commonsPlugin],
 //页面入口文件配置
 entry: {
     'index/index' : './src/pages/index/index.js'
 },
 //入口文件输出配置
 output: {
     filename: 'build/pages/[name].bundle.js'
 },
 module: {
     //加载器配置
     loaders: [
         { test: /\.css$/, loader: 'style!css'},
         { test: /\.js$/, loader: 'jsx-loader?harmony' },
         { test: /\.scss$/, loader: 'style!css!sass?sourceMap'},
         { test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}
     ]
 },
 //其它解决方案配置
 resolve: {
     root: 'F:\Demo\git\webpack', //绝对路径
     extensions: ['', '.js', '.json', '.scss'],
     alias: {
         AppStore : 'js/stores/AppStores.js',
         ActionType : 'js/actions/ActionType.js',
         AppAction : 'js/actions/AppAction.js'
     }
 }
};